xen/arm32: Distinguish guest SError from Xen data aborts
authorWei Chen <Wei.Chen@arm.com>
Thu, 4 May 2017 03:27:49 +0000 (11:27 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 4 May 2017 22:00:44 +0000 (15:00 -0700)
commit777aecb631402b281882e9465268f287202ec7a4
treea327396f1f67c62b3c3d33f846093971fc177f42
parenta68ffd36e9eae8db318c5752f5319d2901ef74b3
xen/arm32: Distinguish guest SError from Xen data aborts

ARM32 doesn't have an exception similar to hyp_sync of ARM64 to catch
the synchronous data abort (For example, a NULL pointer has been referenced).
Hence the SError and sync data abort will be caught by the same data abort
exception.

Since commit "3f16c8cb" we treat all data aborts caught by this excetpion
as SError. This means, we will forward Xen synchronous data abort to guest,
if the serror_op=FORWARD. This is obviously incorrect. But we don't have
any method to distinguish SError from Xen data aborts.

But we can distinguish guest generated SError from Xen data aborts. So we
want to change the policy to handle data aborts for ARM32:
1. If this data abort is guest generated SError, we will handle this data
   abort follow the SError handle option setting.
2. If this data abort is synchronous data abort or Xen generate SError, we
   will PANIC the whole system.

Signed-off-by: Wei Chen <Wei.Chen@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/traps.c